home *** CD-ROM | disk | FTP | other *** search
- /***********************************************************************
- *
- * Access Privilges -- Version 3.0 (Main Program)
- *
- * Copyright (c)
- * Apple Computer, Inc. 1989-1990
- * All Rights Reserved.
- *
- * Developer Technical Support Apple II Sample Code
- *
- * This program demonstrates issuing calls to the AppleShare File System
- * Translator (AppleShare FST). The calls, in in the uWindow.c file, include
- * Get Privileges, Set Privileges, and User Info. Other new system features
- * utilized in this program include resources, the Standard File MultiGet2
- * call for getting a folder selection from a user, static text controls with
- * programmable substitution text, and use of the window manager ErrorWindow
- * routine with GS/OS and toolbox calls.The workings of the program are mostly
- * contained in the CurrentPrivs, NewPrivs, and ChooseFolder routines in the
- * uWindow.c file, and the subroutines they call. Also, this program is
- * adapted from the busy box sample application which features calls to
- * NewWindow2 and the newly enhanced TaskMaster.
- *
- * Developers wishing to see future Apple II network sample code in languages
- * other than C should voice their preference to Apple II Developer Tech Support.
- *
- ***********************************************************************/
-
- #include <types.h>
- #include <quickdraw.h>
- #include <locator.h>
- #include <resources.h>
- #include <memory.h>
-
- extern unsigned int userID;
-
- main()
- {
- Ref initRef; /* This holds the reference to the startstop record */
-
- initGlobals(); /* Initialize our globals. */
-
- userID = MMStartUp(); /* Start up and get ID from memory manager */
- TLStartUp(); /* Start up the tool locator */
-
- /* Startup the tools using the new toolbox call */
- initRef = StartUpTools(userID, refIsResource, 0x0001L);
- if (!_toolErr) {
- setUpMenus(); /* Set up menus */
- setupWindows();
- setupCtrls();
- InitCursor(); /* Make cursor show ready */
- mainEvent(); /* Use application */
- }
-
- ShutDownTools(refIsHandle, initRef);
- /* Let the toolbox shutdown the tools. */
- TLShutDown(); /* Shut down the tool locator */
- }
-